<?php

namespace dengje\workerman;

use think\facade\Cache;
use Workerman\Worker;
use think\facade\Db;

		

class Heartbeat
{
    public static function start(){
        // 心跳防止断链
		$time_interval = 55;
		\Workerman\Timer::add($time_interval, function () {
			 // 尝试执行一个简单的查询来检查连接是否活跃
             Db::connect('mysql')->query('select 1');
       
		});
    }
}